package com.tc.data.test.strategy.table;


import com.tc.data.common.annotation.Strategy;
import com.tc.data.common.strategy.table.TableShardingStrategy;

/**
 * @author Vincent
 * @create 2016-08-15-15:21
 */
@Strategy("tc") //mapper中的表名$[tc]$和策略名和dao的注解名三者统一
public class TableShardingStrategyById extends TableShardingStrategy {
    @Override
    public String getTargetSql(String sql) {
        Object object = getShardingParameterValue();
        return new BaseTableShardingStrategy().getTargetSql(sql, object);
    }
}
